{include file='public/meta'}
<title>新增文章 - 资讯管理 - H-ui.admin v3.0</title>
<meta name="keywords" content="H-ui.admin v3.0,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description" content="H-ui.admin v3.0，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<style>
  .dat,date{width:100px;}
  li{float:left;}
</style>
<body>
<article class="page-container">
  <form class="form form-horizontal" id="form-article-add" method='post' enctype="multipart/form-data">
    <!--社区活动分类-->
      <div class="row cl">
        <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>活动分类：</label>
        <div class="formControls col-xs-8 col-sm-9">
          <select name="type" class='select' style='width:150px'>
            <option value="租客活动">租客活动</option>
            <option value="品质生活">品质生活</option>
            <option value="有趣青年">有趣青年</option>
            <option value="新鲜资讯">新鲜资讯</option>
          </select>
        </div>
      </div>
      <!-- 活动主题 -->
      <div class="row cl">
        <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>活动主题：</label>
        <div class="formControls col-xs-8 col-sm-9">
          <input type="text" class="input-text" placeholder="输入活动主题" name="title" value="" required>
        </div>
      </div>
      <!-- 举办方联系方式 -->
      <div class="row cl">
        <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>联系方式：</label>
        <div class="formControls col-xs-8 col-sm-9">
          <input type="text" class="input-text" placeholder="" name="tel" required minlength=11 maxlength=11>
        </div>
      </div>
      <!--活动开始时间-->
      <div class="row cl">
        <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>活动时间：</label>
        <div class="formControls col-xs-8 col-sm-9">
          <ul>
            <li><input type="text" class="input-text date" name="y" placeholder='年' required minlength=4 maxlength=4></li>
            <li>&nbsp;&nbsp;<input type="text" class="input-text dat" name="m" placeholder='月' required minlength=1 maxlength=2></li>
            <li>&nbsp;&nbsp;<input type="text" class="input-text dat" name="d" placeholder='日' required minlength=1 maxlength=2></li>
          </ul>
        </div>
      </div>
      <!-- 地址 -->
      <div class="row cl">
        <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>地址：</label>
        <div class="formControls col-xs-8 col-sm-9">
          <input type="text" name="addr" placeholder="请输入具体地址" class="input-text" required>
        </div>
      </div>
      <!-- 活动描述 -->
      <div class="row cl">
        <label class="form-label col-xs-4 col-sm-2">活动内容：</label>
        <div class="formControls col-xs-8 col-sm-9"> 
          <script id="editor" type="text/plain" style="width:100%;height:400px;"></script> 
        </div>
      </div>
      <!-- 活动图片 -->
      <div class="row cl">
        <label class="form-label col-xs-4 col-sm-2">活动图片：</label>
        <div class="formControls col-xs-8 col-sm-9"> 
          <input type="file" name="thumb" class="input-text" required> 
        </div>
      </div>
      <div class="row cl">
        <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
          <button class="btn btn-primary radius" id="submit" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存并提交审核</button>
        </div>
      </div>
    </form>
</article>   

{include file='public/footer'}

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/messages_zh.js"></script>   
<script type="text/javascript" src="/static/lib/webuploader/0.1.5/webuploader.min.js"></script> 
<script type="text/javascript" src="/static/lib/ueditor/1.4.3/ueditor.config.js"></script> 
<script type="text/javascript" src="/static/lib/ueditor/1.4.3/ueditor.all.min.js"> </script> 
<script type="text/javascript" src="/static/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
$(function(){
  $('.skin-minimal input').iCheck({
    checkboxClass: 'icheckbox-blue',
    radioClass: 'iradio-blue',
    increaseArea: '20%'
  });
  
  var ue = UE.getEditor('editor');
  
});

$().ready(function(){
    $('form').validate({
      submitHandler:function(form){
        $(form).ajaxSubmit({
          type:'post',
          url:'{:url('admin/club/club_add')}',
          dataType:'text',
          success:function(res){
            layer.msg('添加成功',{icon:1,time:2000},function(){
              location.reload();
            });
          }
        })
      }
    });
  })
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
